import request from '@/utils/request';

export async function queryRule(params) {
  const limit = params.pageSize;
  const page = params.current;
  const my_params = {
    limit: limit,
    page: page,
  };
  Object.assign(params, my_params);
  delete params.current;
  delete params.pageSize;
  return request('/activity/activity/page', {
      params,
  });
}
export async function queryStore(params) {
  return request('store/store/list', {
    params,
  });
}

export async function addActivity(params) {
  return request('activity/activity', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
export async function updateActivity(params) {
  return request('activity/activity/update', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
// 查询商品列表
export async function queryGoods(params) {
  return request('goods/goods/page', {params});
}
